# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=yara-rules
pkgver=1796.0f93570
pkgrel=1
pkgdesc='A Repository of yara rules.'
arch=('any')
url='https://github.com/Yara-Rules/rules'
license=('GPL2')
makedepends=('git')
source=("$pkgname::git+https://github.com/Yara-Rules/rules.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/share/$pkgname"

  cp -a --no-preserve=ownership * "$pkgdir/usr/share/$pkgname/"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

